package com.pzc.service;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.luojun.entity.User;
import com.luojun.util.HibernateUtil;
import com.pzc.dao.UserDao;


public class UserService {
	
	private UserDao userDao = new UserDao();
	Session session = null;
	Transaction transaction = null;
	
	public User login(String username,String password) {
		return userDao.login(username,password);
	}

	public User isExist(String userName) {
		return userDao.isExist(userName);
	}

	public int addUser(User u) {			
			userDao.addUser(u);		
			return 1;
	}
	
	public User DeleteById(int id){
		return userDao.DeleteById(id);
	}
	
	public boolean loginistrue(String username,String password) {
		return userDao.loginistrue(username, password);
	}
	}
	
	
	

